package org.footito.android.activity;

import org.apache.http.client.HttpClient;
import org.footito.android.application.FootitoApplication;
import org.footito.android.data.TeamStatus;
import org.footito.android.data.update.RefreshEventParams;
import org.footito.android.data.update.UpdateListener;
import org.footito.android.data.update.UpdateResults;
import org.footito.android.data.update.UpdaterTools;

import android.os.AsyncTask;
import android.view.View;

public class UpdateMoreEventTaskOld extends AsyncTask<Void, Void, Void> implements UpdateListener {

		private Exception exception;

		@Override
		protected void onPreExecute() {
//			bMore.setVisibility(View.GONE);
//			pbMore.setVisibility(View.VISIBLE);
//			progressBar.setVisibility(View.VISIBLE);
//			buttonRefresh.setVisibility(View.GONE);
			super.onPreExecute();
		}

		@Override
		protected Void doInBackground(Void... taskparams) {
			HttpClient httpclient = FootitoApplication.getApplicationInstance().getConnexion().getHttpClient();
			String publishAfter = null;
			int limit;
//			if (Timeline.this.currentTeam < 0) {
//				limit = 30;
//			} else {
//				limit = 10;
//			}
//			int offset = getListAdapter().getCount();
//			int teamId = Timeline.this.currentTeam;

//			RefreshEventParams params = new RefreshEventParams(publishAfter, limit, offset, teamId);
//			try {
//				UpdaterTools.refreshEventsFromServerParams(httpclient, Timeline.this, providerAdapter, this, params);
//			} catch (Exception e) {
//				exception = e;
//			}
			return null;
		}

		@Override
		protected void onPostExecute(Void result) {
//			bMore.setVisibility(View.VISIBLE);
//			pbMore.setVisibility(View.GONE);
//			progressBar.setVisibility(View.GONE);
//			buttonRefresh.setVisibility(View.VISIBLE);
			super.onPostExecute(result);
		}

		@Override
		public void onComplete(UpdateResults results) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onError(Exception e) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onProgress(Integer... progressId) {
			// TODO Auto-generated method stub

		}

	}